package com.multi.thread.chapter07.demo01;

public class MyThread01 extends Thread {
	
	//构造方法中打印出的日志其实是显示main主线程的状态为RUNNABLE
	public MyThread01() {
		System.out.println("构造方法中的状态：" + Thread.currentThread().getState());
	}
	
	@Override
	public void run() {
		System.out.println("run方法中的状态：" + Thread.currentThread().getState());
	}
	
	public static void main(String[] args) throws InterruptedException {
		MyThread01 thread = new MyThread01();
		System.out.println("main方法中的状态1：" + thread.getState());
		Thread.sleep(1000);
		thread.start();
		Thread.sleep(1000);
		System.out.println("main方法中的状态2：" + thread.getState());
	}

}
